package helipay.api.jedis;

/**
 * 
 * 所有操作Redis的key必须从此获取
 * 
 */
public class RedisKey {
	public static final String ENTITY_PREFIX = "Entity";

	public static final String STRING_PREFIX = "String";

	public static final String HASH_PREFIX = "Hash";

	public static final String SET_PREFIX = "Set";

	public static final String LIST_PREFIX = "List";

	public static final String SORTED_SET_PREFIX = "SortedSet";

	public static final String DELIMITER = ":";

	public static String getEntityPrefix(String Key) {
		return ENTITY_PREFIX+DELIMITER+Key+DELIMITER;
	}

	public static String getStringPrefix(String Key) {
		return STRING_PREFIX+DELIMITER+Key+DELIMITER;
	}

	public static String getHashPrefix(String Key) {
		return HASH_PREFIX+DELIMITER+Key+DELIMITER;
	}

	public static String getSetPrefix(String Key) {
		return SET_PREFIX+DELIMITER+Key+DELIMITER;
	}

	public static String getListPrefix(String Key) {
		return LIST_PREFIX+DELIMITER+Key+DELIMITER;
	}

	public static String getSortedSetPrefix() {
		return SORTED_SET_PREFIX;
	}

	public static String getDelimiter() {
		return DELIMITER;
	}
	
}
